import request from '@/utils/request'
enum API {
  ALL_PROS = '/borrower/products/select',
  SHELVED_PROS = '/borrower/products/shelved',
  SHELF_PRO = '/borrower/products/shelve',
  REMOVE_PRO = '/borrower/products/shelved/',
}
export interface ShelfPro {
  productId: string
  shelfPrice: number
}
export const allBrandProducts = () => request.get(`${API.ALL_PROS}`)
export const shelvedProducts = () => request.get(`${API.SHELVED_PROS}`)

export const shelfProduct = (params: ShelfPro) => request.post(`${API.SHELF_PRO}`, params)
export const removeProduct = (shelfId: string) => request.delete(`${API.REMOVE_PRO}${shelfId}`)
export const updateShelvedPrice = (shelfId: string, params: any) =>
  request.put(`/borrower/products/shelved/${shelfId}/price`, params)
